Optimal Stable Merging

نویسنده

  • Antonios Symvonis
چکیده

This paper shows how to stably merge two sequences A and B of sizes m and n, m n, respectively, with O…m ‡ n† assignments, O…m log…n=m ‡ 1†† comparisons and using only a constant amount of additional space. This result matches all known lower bounds and closes an open problem posed by Dudzinski and Dydek in 1981. Our algorithm is based on the unstable algorithm of Mannila and Ukkonen. All techniques we use have appeared in the literature in more complicated forms but were never combined together. They are powerful enough to make stable all the existing linear in-place unstable algorithms we are aware of. We also present a stable algorithm that requires a linear number of comparisons and assignments which we consider to be the simplest algorithm for in-place merging.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Ratio Based Stable In-Place Merging

We investigate the problem of stable in-place merging from a ratio k = n m based point of view where m, n are the sizes of the input sequences with m ≤ n . We introduce a novel algorithm for this problem that is asymptotically optimal regarding the number of assignments as well as comparisons. Our algorithm uses knowledge about the ratio of the input sizes to gain optimality and does not stay i...

متن کامل

Stable Minimum Storage Merging by Symmetric Comparisons

We introduce a new stable minimum storage algorithm for merging that needs O(m log( n m +1)) element comparisons, where m and n are the sizes of the input sequences with m ≤ n. According to the lower bound for merging, our algorithm is asymptotically optimal regarding the number of comparisons. The presented algorithm rearranges the elements to be merged by rotations, where the areas to be rota...

متن کامل

On Optimal and Efficient in Place Merging

We introduce a new stable in place merging algorithm that needs O(m log( n m +1)) comparisons and O(m+n) assignments. According to the lower bounds for merging our algorithm is asymptotically optimal regarding the number of comparisons as well as assignments. The stable algorithm is developed in a modular style out of an unstable kernel for which we give a definition in pseudocode. The literatu...

متن کامل

Non-normal dynamics of time-evolving co-rotating vortex pairs

Transient energy growth of disturbances to co-rotating pairs of vortices with axial core flows is investigated in an analysis where vortex core expansion and vortex merging are included by adopting a time-evolving base flow. The dynamics of pairs are compared with those of individual vortices in order to highlight the effect of vortex interaction. Three typical vortex pair cases are studied, wi...

متن کامل

A Simple Algorithm for Stable Minimum Storage Merging

We contribute to the research on stable minimum storage merging by introducing an algorithm that is particularly simply structured compared to its competitors. The presented algorithm performs O(m log( n m + 1)) comparisons and O((m + n) log m) assignments, where m and n are the sizes of the input sequences with m ≤ n. Hence, according to the lower bounds of merging the algorithm is asymptotica...

متن کامل

Non-normal dynamics of co-rotating vortex pairs

Transient energy growth of disturbances to co-rotating vortex pairs is investigated in an analysis where vortex core expansion and vortex merging are included. The dynamics of pairs are compared to those of individual vortices in order to highlight the effect of vortex interaction. Three typical vortex pair cases are studied, with the pairs comprised respectively of individually asymptotically ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Comput. J.

دوره 38  شماره 

صفحات  -

تاریخ انتشار 1995